<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'htmlOptions'=>array("class"=>'table table-striped table-hover table-condensed table-white table-detail'),
	'attributes'=>array(
		'id',
		array(
				'name'=>'nom',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_nom == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'prenom',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_prenom == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'pseudo',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_pseudo == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'adr',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_adr == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'cp',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_cp == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'ville',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_ville == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'telfixe',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_telfixe == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'telport',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_telport == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'email',
				'visible'=>(Yii::app()->user->admin_seliste || $model->v_email == 1 || Yii::app()->user->id == $model->id)
		),
		array(
			'name'=>'modecontact',
			'value'=>($model->modecontact==0) ? "Messagerie interne" : (($model->modecontact==1) ? "Email" : (($model->modecontact==2) ? "Téléphone fixe" : "Téléphone portable"))			
		),
		array(
				'name'=>'solde',
				'visible'=>(Yii::app()->user->admin_seliste || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'date_inscr',
				'visible'=>(Yii::app()->user->admin_seliste || Yii::app()->user->id == $model->id)
		),
		array(
				'label'=>'Groupes',
				'type'=>'html',
				'value'=>$model->getGroupes()
		),
		array(
				'label'=>'Administrateur',
				'value'=>($model->admin==1) ? "Global" : (((($model->admin_seliste==1) ? "Sélistes " : "") . (($model->admin_grain==1) ? "Grains " : "") . (($model->admin_echange==1) ? "Echanges" : ""))),
				'visible'=>($model->admin==1 || $model->admin_seliste==1 || $model->admin_grain==1 || $model->admin_echange==1)
		),
		array(
				'label'=>'Grains',
				'type'=>'html',
				'value'=>$model->getGrains()
		),
		
	),
)); ?>